package com.syq.controller;

import com.syq.config.AliyunOss;
import com.syq.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: HelloController
 * @Description: TODO
 * @Create by: syq
 * @Date: 2022/8/10 19:05
 */

@Controller
public class HelloController {

    @Autowired
    private User user;

    @Autowired
    private AliyunOss aliyunOss;

    @GetMapping("/hello")
    @ResponseBody
    public String hello(){
        System.out.println(aliyunOss.getEndpoint()+":"+aliyunOss.getAaccessKeyId()+":"+aliyunOss.getAccessKeySecret()+":"+aliyunOss.getBucketName());
        return "hello spring-boot"+user;
    }

    @GetMapping("/html")
    public String html(){
        return "hello";
    }

}
